#ifndef L2_LINUX_PACKET_H
#define L2_LINUX_PACKET_H

#include "common.h"

int l2_packet_send(struct l2_packet_data *l2, const u8 *dst_addr, u16 proto,
                   const u8 *buf, size_t len);
void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx);
struct l2_packet_data * l2_packet_init(
        const char *ifname, const u8 *own_addr, unsigned short protocol,
        void (*rx_callback)(void *ctx, const u8 *src_addr,
                            const u8 *buf, size_t len),
        void *rx_callback_ctx, int l2_hdr);

#endif
